<%@page import="entity.Items"%>
<%@page import="java.util.ArrayList"%>
<%@page import="dao.ItemsDao"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>商品展示</title>
</head>
<body>
   <h1>商品展示</h1>
   <hr>
   
   
   <center>
      <table width="750" height="60" cellpadding="0" cellspacing="0" border="0">
         <tr>
           <td>
           <%
		      ItemsDao itemsDao = new ItemsDao();
		      ArrayList<Items> list = itemsDao.getAllItems();
		      for(Items items: list) {
    	  
      
  		   %>
               <div style="display: inline-block; margin-right: 20px">
                  <dl>
                     <dt>
                        <a href="details.jsp?id=<%=items.getId() %>"><img alt="" src="images/<%=items.getPicture() %>" width="120" height="150"></a>
                     </dt>
                     <dd style="-webkit-margin-start:0px"><%=items.getName() %></dd>
                     <dd style="-webkit-margin-start:0px">产地<%=items.getCity() %>&nbsp;&nbsp;价格<%=items.getPrice() %></dd>
                  </dl>
               </div>
             <%
               } 
             %>
           </td>
         </tr>
      </table>
   </center>
</body>
</html>